<template>
	<view class="card" >
		<view class="cards" v-for="card in cards" :key="card" @click="navto(card)">
			<view class="number">
					{{card.value}}
			</view>
			<view class="topic" >
				<view class="a">
					{{card.title}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:[
			'cards'
		],
		setup(props){
			
			const navto = (card) => {
				
				console.log("card是什么",card.title)
				if(card.title=="当前客户数(个)"){
					uni.navigateTo({
						url: '/pages/index/Commonlist/Kehulist/Kehulist',
					});
				}else if(card.title=="新增客户数(个)"){
					uni.navigateTo({
						url: '/components/components/Tongjitubiao',
					});
				}else if(card.title=="新增客户数(个)"){
					uni.navigateTo({
						url: '/components/components/Tongjitubiao',
					});
				}
			}
				return {
					navto
				}
			}
		}
</script>

<style scoped lang="scss">
	.card{
		padding-left: 16*2rpx ;
		display: flex;
		flex-wrap: wrap;
		background-color: $uni-text-color-inverse;
		.cards{
			width: 167*2rpx;
			height: 66*2rpx;
			background-color: #f8f8f8;
			margin-right: 8*2rpx ;
			margin-bottom: 8*2rpx ;
			border-radius: 5*2rpx;
			.number{
				font-size: 16*2rpx;
				line-height: 16*2rpx;
				color: #1A1A1A;
				padding: 14*2rpx 0 0 12*2rpx;
			}
			.topic{
				font-size: 13*2rpx;
				line-height: 14*2rpx;
				color: #666666;
				padding: 8*2rpx 0 0 12*2rpx;
			}
		}
	}
</style>
